<!doctype html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport"
    content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
  <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  <title>APP下载</title>
  <link rel="stylesheet" type="text/css" href="/static/admin/jingtaiwu/api.css" />
  <link rel="stylesheet" type="text/css" href="/static/admin/jingtaiwu/aui.css" />
  <link rel="stylesheet" type="text/css" href="/static/admin/jingtaiwu/swiper.min.css" />
  <link rel="stylesheet" type="text/css" href="/static/admin/jingtaiwu/base.css" />
  <link rel="stylesheet" type="text/css" href="/static/admin/jingtaiwu/post.css" />
  <style>
     
  .fixed-bottom {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 48px;
      background: white;
      box-shadow: 0 -0.02rem 0.1rem 0 rgba(222, 228, 234, 0.8);
      padding: 0 15px;
    }

    .fixed-bottom img {
      width: 34px;
      height: 34px;
    }

    .fixed-bottom .info1 {
      flex: 1;
      display: flex;
      flex-flow: column;
      justify-content: space-between;
      height: 34px;
      margin-left: 10px;
    }

    .info1 .info-top {
      color: #3B3B3B;
      font-size: 13px;
    }

    .info1 .info-bottom {
      color: #989898;
      font-size: 11px;
    }

    .btn-download {
      width: 70px;
      height: 29px;
      text-align: center;
      line-height: 29px;
      background: #F96B47;
      border-radius: 14.5px;
      color: #FFFFFF;
      font-size: 12px;
    }
  </style>
</head>

<body>
  <div id="app" v-cloak>
    <div class="fixed-bottom">
      <img src="https://jintianjifen.oss-cn-shanghai.aliyuncs.com/f53953806ed6e7296fc76890aff4b7c9.jpg" alt="">
      <div class="info1">
        <div class="info-top">支分宝</div>
        <div class="info-bottom">支分宝享品质生活</div>
      </div>
      <div class="btn-download" onclick="tz()">立即下载</div>
    </div>
  </div>
</body>
<script type="text/javascript" src="/static/admin/jingtaiwu/api.js"></script>
<script type="text/javascript" src="/static/admin/jingtaiwu/utils.js"></script>
<script type="text/javascript" src="/static/admin/jingtaiwu/jquery.min.js"></script>
<script type="text/javascript" src="/static/admin/jingtaiwu/swiper.min.js"></script>
<script src="/static/admin/jingtaiwu/vue.min.js"></script>
<script src="/static/admin/jingtaiwu/vue-extend.js"></script>
<script type="text/javascript" src="/static/admin/jingtaiwu/common1.js"></script>
<script>
  var vm;

  window.onload = function () {
    vm = new Vue({
      el: '#app',
      data: {
        info: {},
        list: [],
        post_id: getQueryVariable('post_id'),
        show:true,
        isShowShang: false,
      },
      methods: {
        // 初始化
        initData: function () {
          var _this = this;
          var data = {
            values: {
              post_id: this.post_id,
            }
          };
          postAjax(ApiUrl.apiuserpostDetail, data, function (res, err) {
            if (res.status == 200) {
              _this.info = res.msg;
              try {
                var date = new Date(_this.info.post_add_time.replace(/-/g, '/'));

                M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
                D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
                _this.info.post_add_time = M + D
              }catch(e) {

              }
            }
          });
        },
        // 评论列表
        getComment: function () {
          var _this = this;
          var params = {
            values: {
              user_id: 13,
              post_id: this.post_id,
              page: 1
            }
          };
          postAjax(ApiUrl.apiusergetComment, params, function (res, err) {
            if (res.status == 200) {
              _this.list = res.msg;
            } else {

            }
          });

        },
        // 视频播放
        openVideo: function () {
          //赋值
          // $("#vedio").attr("src", src);
          document.getElementById("vedio").play();
          this.show=false
          document.getElementById("vedio").onended=function(){ vm.show=true};
          
        },
        end:function(){
            alert(123)
        },
        // 打开图片
        // openPic: function (img, index) {
        //   openBrowserView(img.split(','), index);
        //   window.open(img.split(','))
        // },
        openPic: function (img) {
          window.open(img)
        },
      },
      mounted: function () {
        this.initData();
        this.getComment();
      }
    });
  };
  function getQueryVariable(variable) {
    var query = window.location.search.substring(1);
    var vars = query.split("&");
    for (var i = 0; i < vars.length; i++) {
      var pair = vars[i].split("=");
      if (pair[0] == variable) {
        return pair[1];
      }
    }
    return false;
  }

  function tz() {
    if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) {
      var loadDateTime = new Date();
      window.setTimeout(function () {
        var timeOutDateTime = new Date();
        if (timeOutDateTime - loadDateTime < 5000) {
          window.location = 'itms-apps://itunes.apple.com/cn/app/wei/id414478124';
        } else {
          window.close();
        }
      }, 300);
    } else {
      window.setTimeout(function () {
        window.location.href = 'https://a.app.qq.com/o/simple.jsp?pkgname=com.kingsuper.jifenuser';
      }, 300);
    }
  }
</script>

</html>